package com.zhilifang.modules.zlf.controller;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhilifang.modules.zlf.entity.IndexShow;
import com.zhilifang.modules.zlf.service.impl.IndexShowServiceImpl;
import com.zhilifang.modules.zlf.utils.Result;

/**
 * Controller 头部菜单Controller
 */
@Controller
@RequestMapping("/indexShowController")
public class IndexShowController {

	@Autowired
	private IndexShowServiceImpl indexShowServiceImpl;


	/**
	 * 后台列表
	 * 
	 * @return
	 */
	@RequestMapping(value = "/selectListData", method = RequestMethod.POST)
	@ResponseBody
	public List<IndexShow> selectListData(){
		return indexShowServiceImpl.selectListData();	
	}

	
	/**
	 * 后台列表查询详情
	 * 
	 * @return
	 */
	@RequestMapping(value = "/selectByPrimaryKey", method = RequestMethod.POST)
	@ResponseBody
	public IndexShow selectByPrimaryKey(int id){
		return indexShowServiceImpl.selectByPrimaryKey(id);	
	}
	
	/**
	 * 后台列表修改
	 * 
	 * @return
	 */
	@RequestMapping(value = "/updateByPrimaryKeySelective", method = RequestMethod.POST)
	@ResponseBody
	public Result updateByPrimaryKeySelective(IndexShow  record){
		Result  result = new Result();
		indexShowServiceImpl.updateByPrimaryKeySelective(record);
		result.setMessage("修改成功");
		result.setState("200");
		return result;	
	}


}
